<template>
    <div class="user-lister" >
      <el-row  v-for="user in cards_users" :key="user.id">
        <user-card
          class="user-card"
          v-bind:card-info="{
          user:user,
          avatar:user.avatar,
           nickname:user.nickname,
        signature:user.signature
        }"></user-card>
      </el-row>
    </div>
</template>

<script>
import UserCard from '@/components/UserCard'

export default {
  name: 'UserLister',
  props: ['users'],
  components: {
    UserCard
  },
  watch: {
    users () {
      this.cards_users = this.users
    }
  },
  data () {
    return {
      cards_users: this.users
    }
  }
}
</script>

<style scoped>
  .user-card{
    width: 27rem;
    padding: 1rem;
  }
</style>
